package edu.upf.opencities.web.dao;


import edu.upf.opencities.datamodel.*;
public interface ServiceDAO{
	
	
	/**
	 * Register a new service
	 * @param mail
	 * @param serviceName
	 * @param owner
	 * @param description
	 * @param updatePeriod
	 * @param section
	 * @param latitude
	 * @param longitude
	 * @param tags
	 * @return
	 */
	public Service registerService(Service service, User user);
	
	/**
	 * @param service
	 * @param user
	 * @return
	 */
	public boolean deleteService(Service service, User user);
	
	/**
	 * Get service Object by ID
	 * @param idService
	 * @return
	 */
	public Service getOneService(String idService);
	
	/**
	 * Return the list of service that belong to a user
	 * @param mail
	 * @return
	 */
	public Services getServicesByProperty(String property, String content);
	
	
	/**
	 * Add service entry
	 * @param idService
	 * @param timeStamp
	 * @param value
	 * @param longitude
	 * @param latitude
	 * @return
	 */
	public String addEntry(Service service, Entry entry);
	
	/**
	 * Get service entries
	 * @param idService
	 * @param numEntries
	 * @return
	 */
	public Services getEntriesFromService(String idService, int numEntries);
	
	/**
	 * Get service last entry
	 * @param idService
	 * @return
	 */
	public Service getLastEntry(String idService);
	
	/**
	 * Add twitter feature to service
	 * @param idService
	 * @param consumerKey
	 * @param consumerSecret
	 * @param token
	 * @param tokenSecret
	 */
	public void addTwitter(Service service, User user);
	
}
